﻿using Abp.Domain.Services;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace DHJ.Cost.TreeStructure
{
   public interface ITreeBaseManager<TNode> : IDomainService where TNode : TreeNodeBase
    {
        Task DelNode(long node);
        Task DelTree(long node);
        List<TNode> GetAllChildren(string nodeCode);
        List<TNode> GetAllRootNode();
        List<TNode> GetChildren(string nodeCode);
        TNode InsertNode(TNode newNode);
        TNode GetNode(long nodeId);
        TNode InsertNode(TNode newNode, long parentNode);
        Task InsertNodesAsync(List<TNode> newNodes);
        Task InsertNodesAsync(List<TNode> newNodes, string parentCode, long parentId);
        Task MoveNode(long nodeId, long targetNodeId);
    }
}